Product Code Database
Example Keywords: glove -call $26-154
barcode-scavenger
   » » Wiki: Dos Api
Tag Wiki 'Dos Api'.
Tag

The DOS API is an which originated with 86-DOS and is used in /PC DOS and other -compatible operating systems. Most calls to the DOS API are invoked using software interrupt 21h (INT 21h). By calling INT 21h with a subfunction number in the AH processor register and other parameters in other registers, various DOS services can be invoked. These include handling keyboard input, video output, disk file access, program execution, memory allocation, and various other activities. In the late 1980s, along with the DOS Protected Mode Interface (DPMI) allow the programs to run in either 16-bit or 32-bit protected mode and still have access to the DOS API.


History of the DOS API
The original DOS API in 86-DOS and MS-DOS 1.0 was designed to be functionally compatible with CP/M. Files were accessed using file control blocks (FCBs). The DOS API was greatly extended in MS-DOS 2.0 with several concepts, including file access using , hierarchical directories and device I/O control.
(1988). 9780914845775, Microsoft Press. .
In DOS 3.1, network redirector support was added. In MS-DOS 3.31, the INT 25h/26h functions were enhanced to support hard disks greater than 32 MB. MS-DOS 5 added support for using upper memory blocks (UMBs). After MS-DOS 5, the DOS API was unchanged for the successive standalone releases of DOS.


The DOS API and Windows
In Windows 9x, DOS loaded the protected-mode system and graphical shell. DOS was usually accessed from a virtual DOS machine (VDM) but it was also possible to boot directly to real mode MS-DOS 7.0 without loading Windows. The DOS API was extended with enhanced internationalization support and support, though the long filename support was only available in a VDM. With Windows 95 OSR2, DOS was updated to 7.1, which added FAT32 support, and functions were added to the DOS API to support this. Windows 98 and also implement the MS-DOS 7.1 API, though Windows Me reports itself as MS-DOS 8.0.

and the systems based on it (e.g. and ) are not based on MS-DOS, but use a , , to handle the DOS API. NTVDM works by running a DOS program in virtual 8086 mode (an emulation of within available on 80386 and higher processors). NTVDM supports the DOS 5.0 API. for uses a similar approach.


Interrupt vectors used by DOS
The following is the list of interrupt vectors used by programs to invoke the DOS API functions.

Terminate program1.0+Implemented in DOS kernel
Main DOS API1.0+Implemented in DOS kernel
Program terminate address1.0+Return address in calling program
Control-C handler address1.0+Default handler is in the command shell (usually COMMAND.COM)
Critical error handler address1.0+Default handler is in the command shell (usually COMMAND.COM)
Absolute disk read1.0+Implemented in DOS kernel, enhanced in DOS 3.31 to support up to 2 GB partitions
Absolute disk write1.0+Implemented in DOS kernel, enhanced in DOS 3.31 to support up to 2 GB partitions
Terminate and stay resident1.0+Implemented in COMMAND.COM in DOS 1.0, DOS kernel in DOS 2.0+
Idle callout2.0+Called by DOS kernel when waiting for input
Fast console output2.0+Implemented by the built-in console device driver or a replacement driver like ANSI.SYS
Networking and critical section3.0+Called by DOS kernel to interface with networking software
Unused
Unused
Unused
Reload transient2.0+Implemented in COMMAND.COM
Multiplex3.0+Implemented in DOS kernel and various programs (PRINT, MSCDEX, DOSKEY, APPEND, etc.) depending on subfunction number


DOS INT 21h services
The following is the list of functions provided via the DOS API primary software interrupt vector.

Program terminate1.0+
Character input1.0+
Character output1.0+
Auxiliary input1.0+
Auxiliary output1.0+
Printer output1.0+
Direct console I/O1.0+
Direct console input without echo1.0+
Console input without echo1.0+
Display string1.0+
Buffered keyboard input1.0+
Get input status1.0+
Flush input buffer and input1.0+
Disk reset1.0+
Set default drive1.0+
Open file1.0+
Close file1.0+
Find first file1.0+
Find next file1.0+
Delete file1.0+
Sequential read1.0+
Sequential write1.0+
Create or truncate file1.0+
Rename file1.0+
Reserved1.0+
Get default drive1.0+
Set disk transfer address1.0+
Get allocation info for default drive1.0+
Get allocation info for specified drive1.0+
Reserved1.0+
Reserved1.0+
Get disk parameter block for default drive1.0+
Reserved1.0+
Random read1.0+
Random write1.0+
Get file size in records1.0+
Set random record number1.0+
Set interrupt vector1.0+
Create PSP1.0+
Random block read1.0+
Random block write1.0+
Parse filename1.0+
Get date1.0+
Set date1.0+
Get time1.0+
Set time1.0+
Set verify flag1.0+
Get disk transfer address2.0+
Get DOS version2.0+
Terminate and stay resident2.0+
Get disk parameter block for specified drive2.0+
Get or set Ctrl-Break2.0+
Get InDOS flag pointer2.0+
Get interrupt vector2.0+
Get free disk space2.0+
Get or set switch character2.0+
Get or set country info2.0+
Create subdirectory2.0+
Remove subdirectory2.0+
Change current directory2.0+
Create or truncate file2.0+
Open file2.0+
Close file2.0+
Read file or device2.0+
Write file or device2.0+
Delete file2.0+
Move file pointer2.0+
Get or set file attributes2.0+
I/O control for devices2.0+
Duplicate handle2.0+
Redirect handle2.0+
Get current directory2.0+
Allocate memory2.0+
Release memory2.0+
Reallocate memory2.0+
Execute program2.0+
Terminate with return code2.0+
Get program return code2.0+
Find first file2.0+
Find next file2.0+
Set current PSP2.0+
Get current PSP2.0+
Get DOS internal pointers (SYSVARS)2.0+
Create disk parameter block2.0+
Get verify flag2.0+
Create program PSP2.0+
Rename file2.0+
Get or set file date and time2.0+
Get or set allocation strategy2.11+
Get extended error info3.0+
Create unique file3.0+
Create new file3.0+
Lock or unlock file3.0+
File sharing functions3.0+
Network functions3.0+
Network redirection functions3.0+
Qualify filename3.0+
Reserved3.0+
Get current PSP3.0+
Get DBCS lead byte table pointer3.0+
Set wait for external event flag3.2+
Get extended country info3.3+
Get or set code page3.3+
Set handle count3.3+
Commit file3.3+
Get or set media id4.0+
Commit file4.0+
Reserved4.0+
Extended open/create file4.0+


Operating systems with native support
  • – most widespread implementation
  • PC DOS – IBM OEM version of MS-DOS
  • OS/2 1.x – Microsoft/IBM successor to MS-DOS and PC DOS
  • – Clone created by and Scopus Tecnologia in
  • – Digital Research DOS family, including , , , etc.
  • – PhysTechSoft & Paragon DOS clone, including S/DOS
  • – Datalight ROM DOS version
  • version
  • – Free, open source DOS clone
  • (IA-32 and x86-64 versions)
  • Windows 95 – contains MS-DOS 7.0
  • Windows 98 – contains MS-DOS 7.1
  • Windows 98 SE – contains MS-DOS 7.1
  • – contains MS-DOS 8.0


Operating systems with DOS emulation layer
  • Concurrent CP/M-86 (3.1 only) with – Digital Research CP/M-86-based OS with optional PC DOS emulator
  • – Digital Research CDOS family with built-in PC DOS emulator
  • – a stripped-down single-user variant of Concurrent PC DOS 4.1–5.0
  • – Digital Research/Novell MDOS family including Datapac System Manager, IMS REAL/32, etc.
  • OS/2 (2.x and later) – IBM operating system using a fully-licensed MS-DOS 5.0 in a
  • (all versions except 64-bit editions and 32-bit ARM editions)


Other emulators


See also
  • BIOS interrupt call
  • Ralf Brown's Interrupt List (RBIL)
  • Comparison of DOS operating systems
  • DOS Protected Mode Interface (DPMI)
  • DOS MZ executable
  • COMMAND.COM


Further reading
  • (1986). 9780914845690, .
    (xvii+1053 pages; 29 cm) (NB. This original edition contains flowcharts of the internal workings of the system. It was withdrawn by Microsoft before mass-distribution in 1986 because it contained many factual errors as well as some classified information which should not have been published. Few printed copies survived. It was replaced by a completely reworked edition in 1988. Https://blogs.msdn.microsoft.com/larryosterman/2004/06/14/does-anyone-remember-the-original-ms-dos-encyclopedia/" target="_blank" rel="nofollow">[1])
  • (1988). 9781556150494, .
    (xix+1570 pages; 26 cm) (NB. This edition was published in 1988 after extensive rework of the withdrawn 1986 first edition by a different team of authors. [2])
  • (1987). 9781556151316, Microsoft Press.
  • (1988). 9780914845775, Microsoft Press. .
  • (1991). 155615321X, Microsoft Press. 155615321X
  • (1993). 9781556155468, Microsoft Press.
  • IBM PC DOS 7 Technical Update
  • (Printed in the UK.)


External links

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs